/*

    Created: peter

    Description： quest name file

    Created Date: 2021-05-11 10:15

*/

import axios from 'axios'

import config from './Api/Config'

import prop from './Api/property'

// const ajax = axios.create({
//   baseURL: 'https://api.test.zhihuimingyi.com',
//   timeout: 10000
// })

// 获取科普文章
function getArticlelist (data) {
  return axios.get(config.url + prop.articlelist, {
    params: data
  })
}

// 获取问答列表
function getQaproblem (data) {
  return axios.get(config.url + prop.qaproblem, {
    params: data
  })
}

// 获取医生列表
function getDoctorList (data) {
  return axios.get(config.url + prop.doctor, {
    params: data
  })
}

// 获取文章详情
function getProbleminfo (data) {
  return axios.get(config.url + prop.probleminfo, {
    params: data
  })
}

// 获取科室列表
function getDepartment () {
  return axios.get(config.url + prop.department)
}

// 获取科普详情
function getArticleinfo (data) {
  return axios.get(config.url + prop.articleinfo, {
    params: data
  })
}

// 获取医生详情
function getDoctorinfo (data) {
  return axios.get(config.url + prop.doctorinfo, {
    params: data
  })
}

function getDoctorevaluate (data) {
  return axios.get(config.url + prop.doctorevaluate, {
    params: data
  })
}

export default {
  getArticlelist,
  getQaproblem,
  getDoctorList,
  getProbleminfo,
  getDepartment,
  getArticleinfo,
  getDoctorinfo,
  getDoctorevaluate
}
